import javax.imageio.plugins.jpeg.JPEGImageReadParam;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {
    static Person person = new Person();
    public static void main(String[] args) throws InterruptedException {
        Thread thread=new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(30000);
                    person.set("cy");
                    System.out.println(Thread.currentThread().getName()+person.getName());


                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        thread.setName("陈勇最帅线程!");
        thread.start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(30000);
                    person.set("袁湘");
                    System.out.println(Thread.currentThread().getName()+person.getName());


                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        }).start();
        while(true){
            ;
        }





    }
}
